// LinkedList general definition

#ifndef LINKEDLISTGENERAL_H
#define LINKEDLISTGENERAL_H

// SELEKTOR
#define FIRST(T)		(T)
#define NEXT(E)			(E)->next
#define OWNERLIST(L)	(L)->_ownerList

// PREDIKAT
#define ISLINKEDLISTEMPTY(L)	(L==NULL)

// TRAVERSAL
#define TRAVERSETOEND(E,from) 			for((E)=(from);NEXT(E)!=NULL;E=NEXT(E))
#define TRAVERSETOEND2(E,from) 			for((E)=(from);(E)!=NULL;E=NEXT(E))
#define TRAVERSETOEND3(E,next,from) 	for((E)=(from),(next)=NEXT(E);(E)!=NULL;E=next,next=((E==NULL)?(NULL):(NEXT(E))))
#define TRAVERSETOENDADV(E,from,prec)	for((E)=(from),prec=NULL;NEXT(E)!=NULL;prec=E,E=NEXT(E))

#endif
